package edu.gxnu.cetcdemo.controller;

import edu.gxnu.cetcdemo.service.ClaimService;
import edu.gxnu.cetcdemo.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
public class ClaimcController {
    @Autowired
    private ClaimService claimService;
    @PostMapping("/claim")
    public Result save(@RequestBody Map<String, Object> map) {
        return claimService.saveResult(map);
    }

    @GetMapping("/claim/{pageNumber}")
    public Result query(@PathVariable Integer pageNumber){
        return claimService.get(pageNumber);
    }
}
